import request from '@/utils/request'

// 上传
export function upload(data) {
  return request({
    url: '/file/oss/upload',
    method: 'post',
    data: data
  })
}

// 下载
export function presignedGetObject(params) {
  return request({
    url: '/file/oss/presignedGetObject',
    method: 'get',
    params: params
  })
}

// 获得上传地址
export function presignedPutObject(params) {
  return request({
    url: '/file/oss/presignedPutObject',
    method: 'get',
    params: params
  })
}

// 删除
export function removeObject(params) {
  return request({
    url: '/file/oss/removeObject',
    method: 'delete',
    params: params
  })
}
